package com.zcf.controller;


import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zcf.common.json.Body;
import com.zcf.pojo.Agent;
import com.zcf.pojo.User;
import com.zcf.service.AgentServiceImpl;
import com.zcf.vo.out.LayuiJson;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ZhaoQi
 * @since 2019-07-05
 */
@CrossOrigin
@Controller
@RequestMapping("/agent")
public class AgentController {
	
	@Autowired
	AgentServiceImpl ai;
	/**
	 * 查看代理
	 * @param agent
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	@PostMapping("setupagent")
	@ResponseBody
	public LayuiJson setupagent(Agent agent,@RequestParam(value = "pageNum") int pageNum,
            @RequestParam(value = "pageSize") int pageSize){
		return ai.setupagent(agent,pageNum,pageSize);
	}
	
	
	
}

